import type { ComponentProps, ReactNode } from 'react'; import type { BaseFormComponentProps } from '../../../types'; import type { Popup } from '../../Overlay/Popup'; import type { DataType } from './types'; type SelectInputProps = BaseFormComponentProps & { /** * Place holder when no value defined */ placeholder?: string; /** * Whether the component in readOnly */ readOnly?: boolean; /** * When searchable, placeholder when no value is searched */ placeholderSearch?: string; /** * Selectable options */ options: DataType; /** * Message to show when no option available */ emptyState?: ReactNode; /** * Whether it is possible to clear the search input */ clearable?: boolean; /** * Size of the input */ size?: 'small' | 'medium' | 'large'; /** * More information regarding/description ofs the selectInput */ labelDescription?: ReactNode; /** * Whether option description is on the right of the option or under it */ descriptionDirection?: 'row' | 'column'; /** * Where to place the additional info prop */ optionalInfoPlacement?: 'left' | 'right'; /** * To add custom fixed elements at the bottom of the dropdown */ footer?: ((closeDropdown: () => void) => ReactNode) | ReactNode; /** * Display an error message under the select bar */ error?: string | boolean; /** * @deprecated This property is automatically enabled when options.length >= 6 or if addOption is enable. * Otherwise, no search bar */ searchable?: boolean; /** * When searchable, set a combobox to dynamically add an option */ addOption?: { text: string; onClick: (searchText: string) => void; }; /** * Display a success message under the select bar */ success?: string; /** * Load more button to implement lazy loading */ loadMore?: ReactNode; /** * When the options are loading, display a skeleton */ isLoading?: boolean; /** * Add a tooltip around the select bar */ tooltip?: string; /** * Adds an option to select every selectable options */ selectAll?: { label: ReactNode; description?: string; }; /** * When options are group, define a option to select every selectable options of a group */ selectAllGroup?: boolean; dropdownAlign?: ComponentProps['align']; autofocus?: boolean; /** * Whether it is possible to select multiple options */ multiselect?: IsMulti; /** * Default value, must be one of the options */ value?: IsMulti extends true ? string[] : string; onChange?: IsMulti extends true ? (value: string[]) => void : (value: string) => void; /** * In some cases, when the space is limited, you will need to change the `portalTarget` of the dropdown for a higher parent element. * If you don't know which element to target, you can use `document.body`. */ portalTarget?: ComponentProps['portalTarget']; /** * Allow to specify a callback called when option dropdown is open * Please wrap that definition in useCallback */ onOpen?: () => void; groupError?: Record; groupEmptyState?: Record; }; export declare function SelectInput({ 'aria-describedby': ariaDescribedBy, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'data-testid': dataTestId, addOption, autofocus, className, clearable, descriptionDirection, disabled, dropdownAlign, emptyState, error, footer, groupEmptyState, groupError, helper, id, isLoading, label, labelDescription, loadMore, multiselect, name, onBlur, onChange, onFocus, onOpen, optionalInfoPlacement, options, placeholder, placeholderSearch, portalTarget, readOnly, required, selectAll, selectAllGroup, size, style, success, tooltip, value, }: SelectInputProps): import("react").JSX.Element; export declare namespace SelectInput { var displayName: string; } export {}; //# sourceMappingURL=index.d.ts.map